<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<!-- <meta http-equiv="refresh" content="2" /> -->
	<title>注册sharelife、上传图片共享</title>
	<!--[if lt IE 9]>
		<script src="<%=basePath %>js/ie9.js"></script>
	<![endif]-->
	<link rel="icon" href="<%=basePath %>images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<%=basePath %>images/favicon.ico" type="image/x-icon" />
	<script src="<%=basePath %>js/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/jquery.cookie.js"></script>
	<script type="text/javascript" src="<%=basePath %>js/cookie.save.js"></script>
	<script src="<%=basePath %>js/jquery.validate.min.js"></script>
	<script src="<%=basePath %>js/sign-up.js"></script>
	<script src="<%=basePath %>js/signup.js"></script>
	<link rel="stylesheet" type="text/css" href="<%=basePath %>css/signup.css" />
</head>
<body>
	<div id="header">
		<div class="header-content">
			<h1 class="logo">
				<a href="<%=basePath %>jsp/index.jsp">photobucket</a>
			</h1>
			<a href="<%=basePath %>jsp/upload.jsp" class="nav-upload">上传</a>
			<form action="pictureAction!findByKeyWord" class="search" method="post">
				<div class="search-group">
					<input type="text" name="keyWord" class="field style" value="用户名、图片类别"/>
					<input type="hidden" name="page" value="1"/>
					<input type="submit" title="Submit" value="" class="submit" />
				</div>
			</form>
			<c:if test="${sessionScope.loginUser != null}">
				<div class="login">
				<img src="<%=basePath %>${sessionScope.loginUser.photoSticker}" width="30" height="30"/>
				<a href="#">${sessionScope.loginUser.userName }</a>
			</div>
			</c:if>
			<c:if test="${sessionScope.loginUser == null}">
				<div class="login">
				<div class="sign-in">
					<a href="javascript:void(0);">登录</a><a href="<%=basePath %>jsp/signup.jsp">注册</a>
				</div>
				<div class="loginbox" style="display: none;">
					<span class="angle"></span>
					<a href="#" class="close">x</a>
					<form action="userAction!signin" class="login-form" method="post">
						<div class="input-group">
							<label for="username">用户名</label>
							<input type="text" name="user.userName" id="username" class="username" />
						</div>
						<div class="input-group">
							<label for="password">密码</label>
							<input type="password" name="user.password" id="password" class="password" />
						</div>
						<div class="input-group ">
							<input type="checkbox" name="checkbox" id="checkbox" class="checkbox"/>
							<small>记住我</small>
							<input type="submit" title="Login" value="登录" class="Login" />
						</div>
						<div class="login-info">
							<p>还没有登录账号？<a href="<%=basePath %>jsp/signup.jsp">立即注册</a></p>
						</div>
					</form>
				</div>
			</c:if>
			</div>
		</div>
	</div> <!-- header -->
	<form action="userAction!register?regStep=1" class="signup" method="post" id="registerForm">
		<div class="content">
			<h2>欢迎注册sharelife<img src="../images/green.png"></h2>
			<p><a href="#"></a></p>
			<div class="input-groups">
				<div class="input-group2">
					<label for="username">用户名：</label>
					<input type="text" name="user.userName" id="user.userName" />
				</div>
				<div class="input-group2">
					<label for="username">密码：</label>
					<input type="password" name="user.password" id="pass" />
				</div>
				<div class="input-group2">
					<label for="username">密码确认：</label>
					<input type="password" name="confirm" id="confirm" />
				</div>
				<div class="input-group2">
					<label for="username">电子邮箱：</label>
					<input type="text" name="user.email" id="user.email" />
				</div>
				<div class="input-group2">
					<label for="username">验证码：</label>
					<input type="text" name="captcha" id="captcha" maxlength="6"/>
				</div>
				<div class="input-group2">
					<label for="username">&nbsp;</label>
					<img src="<%=basePath %>patchca.png" id="codeimg" title="点击刷新验证码" style="cursor: pointer;">
				</div>
				
				<input type="submit" value="注册" id="submit-signup" />
			</div>
		</div>
	</form>
	<div class="footer">
		<div class="footer-content">
			<p>Copyright 2012 Sharelife Corporation.  All rights reserved.  |   <a href="#">Privacy policy</a>  |   <a href="#">Terms of use</a>  |   <a href="#">Site map</a></p>
		</div>
	</div>
</body>
</html>